package edu.zut.cs.javaee.manager.score.domain;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import edu.zut.cs.javaee.manager.base.domain.BaseTreeEntity;
import edu.zut.cs.javaee.manager.department.domain.Leadership;

/**
 * 1-n results->score
 * 
 * @author 57281
 *
 */
@Entity
@Table(name = "T_RESULTS")
@NamedQueries({ @NamedQuery(name = "Results.getRoot", query = "select s from Results s ") })
public class Results extends BaseTreeEntity<Results, Long> {
	/**
	* 
	*/
	private static final long serialVersionUID = -1733176068351278303L;

	@Column
	String results_stuname;

	
	@Column
	String results_cname;

	/**
	 * Inject one-to-many connections
	 */
	@OneToMany(mappedBy = "results", cascade = CascadeType.REMOVE, fetch = FetchType.EAGER)
	List<Score> scores;	
	
	public String getResults_stuname() {
		return results_stuname;
	}

	public void setResults_stuname(String results_stuname) {
		this.results_stuname = results_stuname;
	}

	public String getResults_cname() {
		return results_cname;
	}

	public void setResults_cname(String results_cname) {
		this.results_cname = results_cname;
	}

}